{extend name="base" /}
{block name="body"}
<style type="text/css" >
.layui-table th {
    padding: 9px 9px;
}
</style>
<div class="layui-body">
    <!--tab标签-->
    <div class="layui-tab layui-tab-brief">
        <ul class="layui-tab-title">
            <li class="layui-this">资金变动记录</li>
        </ul>
        <div class="layui-tab-content">
            <div class="layui-tab-item layui-show">
                <form class="layui-form layui-form-pane" action="{:url('admin/fund/index')}" method="get">
                    <div class="layui-inline">
                        <label class="layui-form-label">关键词</label>
                        <div class="layui-input-inline">
                            <input type="text" name="keyword" value="{$keyword}" placeholder="请输入关键词" class="layui-input">
                        </div>
                    </div>
                    <div class="layui-inline">
                        <label class="layui-form-label">钱包类型</label>
                        <div class="layui-input-block">
                            <select name="wallet_type_id">
                                <option value="">请选择</option>
                                {foreach name="wallet_type" item="vo" key="k"}
                                <option value="{$k}"  {eq name="wallet_type_id" value="$k"}selected{/eq} >{$vo}</option>
                                {/foreach}
                            </select>
                        </div>
                    </div>
                    <div class="layui-inline">
                        <label class="layui-form-label">操作类型</label>
                        <div class="layui-input-block">
                            <select name="change_type_id">
                                <option value="">请选择</option>
                                {foreach name="change_type" item="vo" key="k"}
                                <option value="{$k}"  {eq name="change_type_id" value="$k"}selected{/eq} >{$vo}</option>
                                {/foreach}
                            </select>
                        </div>
                    </div>
                    <div class="layui-inline">
                        <label class="layui-form-label">开始时间</label>
                        <div class="layui-input-inline">
                            <input type="text" name="begin_time" value="{$begin_time}" class="layui-input datetime">
                        </div>
                    </div>
                    <div class="layui-inline">
                        <label class="layui-form-label">结束时间</label>
                        <div class="layui-input-inline">
                            <input type="text" name="end_time" value="{$end_time}" class="layui-input datetime">
                        </div>
                    </div>
                    <div class="layui-inline">
                        <button class="layui-btn">搜索</button>
                    </div>
                </form>
                <hr>
                <table class="layui-table">
                    <thead>
                    <tr>
                        <th style="width: 30px;">ID</th>
                        <th>用户名</th>
                        <th>变动前</th>
                        <th>金额<span style="color:#e90d24;">({$fund.sum_num})</span></th>
                        <th>变动后</th>
                        <th>钱包类型</th>
                        <th>操作类型</th>
                        <th style="max-width: 400px;">描述</th>
                        <th>时间</th>
                    </tr>
                    </thead>
                    <tbody>
                    {foreach name="list" item="vo"}
                    <tr>
                        <td>{$vo.id}</td>
                        <td>{$vo.user_name}</td>
                        <td>{$vo.before_num}</td>
                        <td>{$vo.num}</td>
                        <td>{$vo.later_num}</td>
                        <td>{$wallet_type[$vo.wallet_type]}</td>
                        <td>{$change_type[$vo.change_type]}</td>
                        <td>{$vo.description}</td>
                        <td>{$vo.time|date_time}</td>
                    </tr>
                    {/foreach}
                    </tbody>
                </table>
                <!--分页-->
                {$list->render()}
            </div>
        </div>
    </div>
</div>
{/block}